package main

import (
	"net/http"
	"fmt"
	"io"
	"log"
)

func main(){
	resp, err := http.Get("https://www.baidu.com/robots.txt")
	if err != nil {
		log.Fatal(err)
		return
	}
	fmt.Println(resp.Status)
	res, err := io.ReadAll(resp.Body)
	defer resp.Body.Close()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(string(res))
}
